<template>
  <view class="page flex flex-col">
    <view v-html="htmlValue" class="bgFFF borderAndRadius p5 box">
      
    </view>
    <view class="w100P ml10 mr10">
      <button type="primary" @click="readed" class="FormButton">
        我已阅读并同意
      </button>
    </view>
  </view>
</template>

<script>
import { mapState } from "vuex";
export default {
  data() {
    return {
      htmlValue: ''
    }
  },
  computed: {
    ...mapState(["common", "cart"]),
    appStyle() {
      let style = this.common.appStyle;
      // uni.setNavigationBarColor({
      // 	backgroundColor: style.home_nav_color
      // });
      return style;
    },
  },
  onLoad() {
  	this.loadData();
  },
  methods:{
	  async loadData(){
		  let res = await this.$api.get({
			  url: '/wanlshop/article/getByKey?key=invoice_policy',
		  })
		  console.log('发票相关政策',res)
		  this.htmlValue = res.data.content || '';
	  },
	  readed(){
		  uni.setStorageSync('invoice_check', 2);
		  uni.navigateBack(1);
	  }
  }
}
</script>

<style lang="scss" scoped>
.page {
  background-color: #f6efe9;
  height: 100vh;
  padding: 20rpx;
}

.box {
  margin-bottom: 130rpx;
  overflow: auto;
  color: $font-color-dark;
  line-height: 1.5rem;
  padding: 18rpx;
  box-sizing: border-box;

  ::v-deep a {
    text-decoration: underline;
  }
}

.FormButton {
  width: 710rpx;
  height: 80rpx;
  line-height: 80rpx;
  border-radius: 756rpx;
  background: $theme !important;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 30rpx;
  font-size: 28rpx;
}
</style>
